#! /bin/sh

WIDTH=300
HEIGHT=420
WIDTHOFF1=0
WIDTHOFF2=305
HEIGHTOFF1=2
HEIGHTOFF2=450

p2=6
p1=6
size=64

infile=ffile.dat
reconfile=recon.dat
mrafile=mra.dat
dfile=d.dat

make

./createf > $infile

mrafxzwt verbose=1 order=4 p2=$p2 p1=$p1 \
	mralevel2=3 mralevel1=3 reconfile=$reconfile \
	dfile=$dfile recon=0 n1=$size n2=$size \
	<$infile > $mrafile
  
xmovie n1=$size n2=$size title="Original Model" \
	style=normal\
	< $infile -geometry ${WIDTH}x${HEIGHT}+${WIDTHOFF1}+${HEIGHTOFF1} &   

xmovie n1=$size n2=$size title="MRA of the Model" \
	< $mrafile \
	-geometry ${WIDTH}x${HEIGHT}+${WIDTHOFF1}+${HEIGHTOFF2}& 

xmovie n1=$size n2=$size title="Reconstructed Model" style=normal \
	< $reconfile \
	-geometry ${WIDTH}x${HEIGHT}+${WIDTHOFF2}+${HEIGHTOFF1}&

xmovie n1=$size n2=$size title="Difference" style=normal \
	< $dfile     \
	-geometry ${WIDTH}x${HEIGHT}+${WIDTHOFF2}+${HEIGHTOFF2} &

exit 0
